<?php
class DefaultControl extends ControlHelp
{
    
    
    private static $Contorl,$AdminRbac;
    
    public function __construct()
    {
	parent::__construct();
    }
    public function showPages()
    {
        return ControlHelp::PageUrl();
    }    
    public function readsiteinfo($field)
    {
	$mydb = new DataBaseObject();     
	$info = $mydb->db->selectSingle('siteconfig',array('id'=>1));
	return $info[$field];
    }
    
    public function getClassName($classid)
    {
	$mydb = new DataBaseObject();     
	$info = $mydb->db->selectSingle('articleclass',array('id'=>$classid));
	return $info['classname'];	
    }
	//列表
	public function listArticle($whstr= array())
	{
		return ControlHelp::listModel('article',$whstr);
	}
	
	
	public function modelPages($id)
	{
	    $mydb = new DataBaseObject();     
	    return $mydb->db->selectSingle('pages',array('id'=>$id));		
	}
	
	public function modelArticle($id)	
	{
	    $mydb = new DataBaseObject();     
	    return $mydb->db->selectSingle('article',array('id'=>$id));		    
	}	
	public function modelArticleClass($id)	
	{
	    $mydb = new DataBaseObject();     
	    return $mydb->db->selectSingle('articleclass',array('id'=>$id));		    
	}	    
}
?>
